|
|
|
|
|
|
|
For example, to adjust the value of the LockRetry setting, you could use the following code: |
|
|
|
|
|
|
|
|
DBEngine.SetOption dbLockRetry = dbLockRetry * 1.5 |
|
|
|
|
|
|
|
|
Any changes made to the Registry settings are in effect only as long as your program is running. They are not saved to the Windows Registry. |
|
|
|
|
|
|
|
|
The Idle method forces Visual Basic to pause while the DBEngine catches up on any changes that have been made to all the open data-access objects. This method becomes useful when you have a lot of database traffic or a lot of data-access objects in a single program. The syntax is simple: |
|
|
|
|
|
|
|
|
The Workspace Data Object |
|
|
|
|
|
|
|
|
The Workspace data object identifies a database session for a user. Workspaces are created each time you open a database using Microsoft Jet. You can explicitly create Workspace objects to manage database transactions for users and to provide a level of security during a database session. Even if you do not explicitly create a Workspace object, Visual Basic 5.0 creates a default Workspace each time you begin database operations. |
|
|
|
|
| |
|
|
|
|
Although you can create Workspace data objects, you can't save them. Workspace objects are temporary. They cease to exist as soon as your program stops running or as soon as you close your last data access object. |
|
|
|
|
|
|
|
|
|
|
The Workspace object contains three collections, two properties, and eight methods. The Workspaces collection contains one property (Count) and one method (Refresh). The Workspaces collection enables you to access multiple Workspace objects. The Workspace object enables you to access the properties, collections, and methods of the named Workspace object. |
|
|
|
|
|
|
|
|
The Workspace Object Collections |
|
|
|
|
|
|
|
|
The Workspace data-access object contains three object collections: |
|
|
|
|
|
|
|
|
· Databases: A collection of all the Database objects opened for this Workspace object. This is the default collection. |
|
|
|
|
|